package com.hfzy.ihk.facade.linkcall.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

public enum CheckStatus implements CustomEnumType {
    YES("Y", "已审核"),
    NO("N", "未审核"),
    BACK("B", "驳回");

    CheckStatus(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;
    private String desc;


    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    private static Map<String, CheckStatus> map = new HashMap<>();
    static {
        for (CheckStatus value : CheckStatus.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static CheckStatus fromValue(String value) {
        CheckStatus ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + CheckStatus.class + "." + value);
        }
    }


}
